//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public class AlphaReplaceEffect : Effect
    {
        private int a;

        public int Alpha
        {
            get { return a; }
            set { a = value; }
        }

        internal override void ReadXmlCore(ReadContext context)
        {
            using (var c = context.Read("alphaRepl"))
            {
                Alpha = c.GetInteger("a");
            }
        }

        internal override void WriteXmlCore(WriteContext context)
        {
            using (WriteContext c = context.Write("alphaRepl"))
            {
                c.SetInteger("a", Alpha);
            }
        }
    }
}